import service from '../request';


const controller = "ProductInfo"


function getAll(data : any) {
	return service({
		method: 'get',
		url: controller+'/getAll',
		params: data,

	})
}
function post(data : any) {
	return service({
		method: 'post',
		url: controller,
		data: data,
	})
}
/*
修改
*/
function put(id:number,data : any) {
	return service({
		method: 'put',
		url: controller,
		data: data,
		params:{id}
	})
}
/**
* 查找单个
* @param {*} data 
* @returns 
*/
function get(id : number) {
	return service({
		method: 'get',
		url: controller+ "/" + id,
		// params: data,

	})
}
/**
* 删除
* @param {*} data 
* @returns 
*/
function del(id : number) {
	return service({
		method: 'delete',
		url: controller + "/" + id,
		//params: data,　　　　 

	})
}
function Query(data : any) {
	return service({
		method: 'get',
		url: controller+'/Query',
		params: data,

	})
}
export default {
	Query,
	get,
	post,
	put,
	del,
	getAll
}